global.webpackJsonp([ 61 ], {
    "7Kak": function(t, i) {},
    EUZ4: function(t, i, e) {
        var s = {
            render: function() {
                var t = this, i = t.$createElement, e = t._self._c || i;
                return e("div", {
                    staticClass: "buy-ticket-page",
                    class: [ t.isIphoneX ? "is-iphone-x" : "", "theme-" + t.theme ]
                }, [ t.hintText ? e("div", {
                    staticClass: "tip-box-line",
                    attrs: {
                        eventid: "1"
                    },
                    on: {
                        tap: t.showBuyTicketTip
                    }
                }, [ e("div", {
                    staticClass: "tip-box",
                    attrs: {
                        eventid: "0"
                    },
                    on: {
                        tap: t.showTip
                    }
                }, [ e("xc-icon", {
                    attrs: {
                        name: "tishi",
                        size: "12",
                        color: "#349cec",
                        mpcomid: "0"
                    }
                }), t._v(" "), e("div", {
                    staticClass: "tip-text"
                }, [ e("rich-text", {
                    attrs: {
                        nodes: t.hintText,
                        mpcomid: "1"
                    }
                }) ], 1), t._v(" "), e("xc-icon", {
                    attrs: {
                        name: "you",
                        size: "12",
                        color: "#cbcbcb",
                        mpcomid: "2"
                    }
                }) ], 1) ]) : t._e(), t._v(" "), e("div", {
                    staticClass: "ticket-container"
                }, [ t._l(t.ticketTypeList, function(i, s) {
                    return [ e("div", {
                        key: s,
                        staticClass: "ticket-box"
                    }, [ e("div", {
                        staticClass: "ticket-msg"
                    }, [ e("div", {
                        staticClass: "ticket-img"
                    }, [ e("img", {
                        attrs: {
                            src: i.ticketImageUrl,
                            mode: "aspectFill"
                        }
                    }) ]), t._v(" "), e("div", {
                        staticClass: "ticket-info"
                    }, [ e("div", {
                        staticClass: "ticket-name"
                    }, [ t._v(t._s(i.ticketTypeName)), e("span", [ t._v(t._s(i.timeName)) ]) ]), t._v(" "), e("div", {
                        staticClass: "ticket-price"
                    }, [ e("span", {
                        staticClass: "cur-price"
                    }, [ t._v("￥" + t._s(i.productPrice)) ]), t._v(" "), i.dayRemain ? e("span", {
                        staticClass: "ticket-num"
                    }, [ t._v("剩余" + t._s(i.dayRemain) + "张") ]) : t._e(), t._v(" "), i.dayRemain ? t._e() : e("span", {
                        staticClass: "ticket-num"
                    }, [ t._v("已售完") ]) ]) ]) ]), t._v(" "), e("div", {
                        staticClass: "counter"
                    }, [ i.ticketCountNo > 0 && i.dayRemain ? e("div", {
                        staticClass: "substract",
                        class: {
                            "tap-state": i.ticketCountNo > 0
                        },
                        attrs: {
                            eventid: "2-" + s
                        },
                        on: {
                            tap: function(e) {
                                t.decrement(i);
                            }
                        }
                    }, [ e("xc-icon", {
                        attrs: {
                            name: "jian",
                            size: "28",
                            color: "#999",
                            "size-unit": "rpx",
                            mpcomid: "3-" + s
                        }
                    }) ], 1) : t._e(), t._v(" "), i.ticketCountNo > 0 && i.dayRemain ? e("div", {
                        staticClass: "no",
                        class: {
                            "right-border": i.dayRemain && i.ticketCountNo == i.dayRemain
                        }
                    }, [ e("span", [ t._v(t._s(i.ticketCountNo)) ]) ]) : t._e(), t._v(" "), e("div", {
                        staticClass: "plus",
                        class: {
                            "tap-state": i.ticketCountNo > 0 && i.ticketCountNo <= i.dayRemain && i.ticketCountNo < i.dayAmount
                        },
                        attrs: {
                            eventid: "3-" + s
                        },
                        on: {
                            tap: function(e) {
                                t.increment(i);
                            }
                        }
                    }, [ e("xc-icon", {
                        attrs: {
                            name: "jia",
                            size: "28",
                            color: "#999",
                            "size-unit": "rpx",
                            mpcomid: "4-" + s
                        }
                    }) ], 1) ]) ]) ];
                }) ], 2), t._v(" "), e("div", {
                    staticClass: "submit-box"
                }, [ e("div", {
                    staticClass: "info-box"
                }, [ e("div", {
                    staticClass: "info"
                }, [ e("span", {
                    staticClass: "desc"
                }, [ t._v("已选择票数：") ]), t._v(" "), e("span", {
                    staticClass: "no"
                }, [ t._v(t._s(t.ticketNum)) ]) ]), t._v(" "), e("div", {
                    staticClass: "price"
                }, [ e("span", {
                    staticClass: "desc"
                }, [ t._v("合计：") ]), t._v(" "), e("span", {
                    staticClass: "no"
                }, [ t._v("￥" + t._s(t.showPrice)) ]) ]) ]), t._v(" "), e("div", {
                    staticClass: "submit",
                    attrs: {
                        eventid: "4"
                    },
                    on: {
                        tap: t.submit
                    }
                }, [ e("div", {
                    staticClass: "submit-btn",
                    class: {
                        "select-ticket": t.ticketNum > 0
                    }
                }, [ t._v("提交订单") ]) ]) ]), t._v(" "), t.showTipBox ? e("cover-box-for-tip", {
                    attrs: {
                        hideConfirm: "true",
                        title: "购票须知",
                        content: t.hintText || "购票须知",
                        eventid: "5",
                        mpcomid: "6"
                    },
                    on: {
                        cancel: t.handleTipCancel
                    }
                }) : t._e(), t._v(" "), t.showNoTicket ? e("tip-page", {
                    attrs: {
                        text: "无可销售的票",
                        mpcomid: "7"
                    }
                }) : t._e() ], 1);
            },
            staticRenderFns: []
        };
        i.a = s;
    },
    "H/gK": function(t, i, e) {
        var s = e("mvHQ"), c = e.n(s), n = e("Dd8w"), a = e.n(n), o = e("75He"), r = e("rG5b"), u = e("RyI1"), d = e.n(u), v = e("2247"), m = e.n(v), p = e("oqQY"), h = e.n(p), l = e("6YNT"), k = e("wAcR"), C = e("khYN"), _ = e("YaEn"), f = e("8xno");
        i.a = {
            data: function() {
                return {
                    countNo: 0,
                    venueId: "",
                    serviceId: "",
                    date: "",
                    ticketTypeList: [],
                    ticketNum: 0,
                    priceNum: 0,
                    tradeId: "",
                    showTipBox: !1,
                    hintText: "",
                    showNoTicket: !1
                };
            },
            components: {
                "xc-icon": o.a,
                "tip-page": k.a,
                CoverBoxForTip: l.a
            },
            mixins: [ f.a ],
            computed: {
                showPrice: function() {
                    return this.m2front(this.priceNum);
                }
            },
            onShow: function() {
                this.ticketNum = 0, this.ticketPrice = 0, this.priceNum = 0, this.showNoTicket = !1, 
                this.getTicketList();
            },
            onLoad: function() {
                this.ticketTypeList = [], this.ticketNum = 0, this.priceNum = 0, this.showTipBox = !1, 
                this.hintText = "", this.venueId = this.$root.$mp.query.venueId || "", this.serviceId = this.$root.$mp.query.serviceId || "", 
                this.getTicketList(), this.getHintMessage();
            },
            methods: {
                showBuyTicketTip: function() {
                    this.showTipBox = !0;
                },
                handleTipCancel: function() {
                    this.showTipBox = !1;
                },
                getTicketList: function() {
                    var t = this, i = {
                        venueId: this.venueId
                    };
                    this.serviceId && (i.serviceId = this.serviceId), r.g.getTicketSaleList(i).then(function(i) {
                        i.ticketTypeList.length && (t.ticketTypeList = i.ticketTypeList.map(function(i) {
                            return a()({}, i, {
                                productPrice: t.m2front(i.price),
                                ticketCountNo: 0
                            });
                        }));
                    }).catch(function(i) {
                        1e3 === i.error ? t.showNoTicket = !0 : Object(C.t)({
                            title: i.message
                        });
                    });
                },
                getHintMessage: function() {
                    var t = this;
                    r.a.queryWechatRemindMessage(this.venueId).then(function(i) {
                        t.hintText = i.wechatRemindMessage || "";
                    });
                },
                increment: function(t) {
                    t.ticketCountNo < t.dayRemain && t.ticketCountNo < t.dayAmount && (t.ticketCountNo += 1, 
                    this.ticketNum += 1, this.priceNum += t.price);
                },
                decrement: function(t) {
                    t.ticketCountNo > 0 ? (t.ticketCountNo -= 1, this.ticketNum -= 1, this.priceNum -= t.price) : t.ticketCountNo = 0;
                },
                m2front: function(t) {
                    return "" === t || void 0 === t ? "" : (t / 100).toFixed(2);
                },
                submit: function() {
                    var t = this;
                    if (this.ticketNum) {
                        var i = d()(this.ticketTypeList, function(t) {
                            return t.ticketCountNo > 0;
                        });
                        i = m()(i, function(t) {
                            return {
                                ticketTypeId: t.ticketTypeId,
                                num: t.ticketCountNo,
                                ticketPrice: t.price,
                                ticketTimeId: t.timeId,
                                cashPledge: t.cashPledge
                            };
                        });
                        var e = {
                            serviceId: this.serviceId,
                            ticketInfo: c()(i),
                            date: h()().format("YYYY-MM-DD")
                        };
                        this.venueId && (e.venueId = this.venueId), r.g.singleTicketOrder(e).then(function(i) {
                            t.tradeId = i.tradeId, _.a.go({
                                key: "pay",
                                params: {
                                    preferUrl: "successPay",
                                    tradeId: i.tradeId,
                                    serviceId: t.serviceId
                                }
                            });
                        });
                    }
                }
            }
        };
    },
    PElO: function(t, i, e) {
        Object.defineProperty(i, "__esModule", {
            value: !0
        });
        var s = e("czAg"), c = e("5nAL");
        new (e.n(c).a)(s.a).$mount(), i.default = {
            config: {
                navigationBarTitleText: "订场购票"
            }
        };
    },
    czAg: function(t, i, e) {
        var s = e("H/gK"), c = e("EUZ4"), n = e("hHyJ")(s.a, c.a, function(t) {
            e("7Kak");
        }, null, null);
        i.a = n.exports;
    }
}, [ "PElO" ]);